package ooday03;

/** Animal家族测试类 */
public class AnimalTest {
    public static void main(String[] args) {
        //Animal oo = new Animal(); //编译错误，抽象类不能被实例化

        Dog dog = new Dog("小黑",2,"黑");
        dog.eat();
        dog.drink();
        dog.lookHome();

        Chick chick = new Chick("小花",1,"花");
        chick.eat();
        chick.drink();
        chick.layEggs();

        Fish fish = new Fish("小金",2,"金");
        fish.eat();
        fish.drink();
    }
}











